package org.jadapter.examples.payment;

import org.jadapter.registry.TransformerRegistry;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * User: pjesi
 * Date: Jan 18, 2011
 * Time: 11:28:21 PM
 */
public class PaymentApp {


    private TransformerRegistry adapters;

    @Autowired
    public PaymentApp(TransformerRegistry adapters){
        this.adapters = adapters;
    }

    public void pay(Object context){
        Payment payment = adapters.transform(context, Payment.class);
        payment.pay();

    }

}
